<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="../../pccommon.jsp"%>
<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="${staticPath}/pccss/style.css" />
<title>购物车</title>
</head>
<script type="text/javascript">
function showCartsContent(){
	$.showLoading();
	var cartItemsCookie = $.cookie("cartItems");
	if(cartItemsCookie==undefined||"undefined"==cartItemsCookie||cartItemsCookie==null){
		cartItemsCookie="";
	}
	var token = $.cookie("token");
	if(token==undefined||"undefined"==token||token==null){
		token="";
	}
	$.ajax({
		url:appPath+"/cart/listCartItems.htm",
		dataType:'html',
		type:'post',
		data:{
			token: token,
			cc:cartItemsCookie
		},
		success:function(data){
			$.hideLoading();
			var div = $(data).find("#carts_content_div");
			$("#carts_content_div").html($(div[0]).html());
			readyDo();
			//同步本地cookie
			//$.cookie('cartItems',$("#synchronizeCookieStr").val(), { expires: 7, path: '/' }); 
		},error:function(){
			$.hideLoading();
			$.alert("系统异常，请重试");
		}
	})
}
$(document).ready(function(){
	showCartsContent();
});
</script>
<body>
<div id="wrapper">
	<c:import url="../layout/header1.jsp"></c:import>
	<div id="carts_content_div"></div>
	<c:import url="../layout/footer.jsp"></c:import>
</div>
<script src="${staticPath}/js/app/cart/cart.js"></script>
<script src="${staticPath}/js/app/cart/pclist.js"></script>
</body>
</html>
